#include "types.h"
#include "stat.h"
#include "user.h"
#include "fcntl.h"

int main(int argc, char *argv[])
{
  if(argc < 4)
    {
	printf(1,"not enough params\n");
	exit();
    }
  if(*argv[3]=='l')
{
  if((fprot(argv[1],argv[2]))<0)
     {
	printf(1,"failed to protect file\n");
	exit();
     }
}
 if(*argv[3]=='u')
{
  if((funprot(argv[1],argv[2]))<0)
     {
	printf(1,"failed to unprotect file\n");
	exit();
     }
}
exit();
}
